package org.dtrd.modules.record.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.record.entity.po.DtrdEntRdSigninSugarValuePhoto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>
 * 血糖记录表
 * </p>
 *
 * @author xiao
 * @since 2022-07-25
 */
@Data
@ApiModel(value = "血糖记录表详情")
public class SugarValuePhotoDetail {

    private Integer dataId;

    @ApiModelProperty(value = "用户ID", required = true)
    @NotNull
    private Integer patientId;

    private Date recordDate;

    private Date recordTime;

    @ApiModelProperty(value = "照片以 , 拼接", required = true)
    @NotBlank
    private String recordPhoto;

    private String sugarValueRemark;

    public SugarValuePhotoDetail parseFromPo(DtrdEntRdSigninSugarValuePhoto po) {
        dataId = po.getDataId();
        patientId = po.getPatientId();
        recordDate = po.getRecordDate();
        recordTime = po.getRecordTime();
        recordPhoto = po.getRecordPhoto();
        sugarValueRemark = po.getSugarValueRemark();
        return this;
    }
}
